//
//  LGSliderDrawerConfigure.h
//  LGSliderDrawer
//
//  Created by apple on 2021/3/24.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height

#define kWself typeof(self) wself = self;

typedef NS_ENUM(NSUInteger,LGSliderDrawerTransitionDirection) {
    LGSliderDrawerTransitionDirectionFromLeft = 0,  // 左侧滑出
    LGSliderDrawerTransitionDirectionRight          // 右侧滑出
};

typedef NS_ENUM(NSUInteger,LGSliderDrawerGestureType) {
    LGSliderDrawerGestureTypePan = 0,   // 拖动手势
    LGSliderDrawerGestureTypeEdgePan    // 边缘拖动手势
};

@interface LGSliderDrawerConfigure : NSObject
/**
 根控制器可偏移的距离，默认为屏幕的0.75
 */
@property (nonatomic,assign) float distance;

/**
 抽屉显示动画的持续时间，默认为0.25f
 */
@property (nonatomic,assign) NSTimeInterval showAnimDuration;

/**
 抽屉隐藏动画的持续时间，默认为0.25f
 */
@property (nonatomic,assign) NSTimeInterval HiddenAnimDuration;

/**
 遮罩的透明度 默认为0
 */
@property (nonatomic,assign) float maskAlpha;

/**
 菜单滑出的方向，默认为从右侧滑出
 */
@property (nonatomic,assign) LGSliderDrawerTransitionDirection direction;

/**
 菜单滑出的手势，默认为拖动
 */
@property (nonatomic,assign) LGSliderDrawerGestureType gestureType;


/**
 默认配置

 @return 配置对象本身
 */
+ (instancetype)defaultConfiguration;

/**
 创建一个配置对象的实例方法

 @param distance 偏移距离
 @param alpha 遮罩的透明度
 @param direction 滑出方向
 @return 配置对象本身
 */
- (instancetype)initWithDistance:(float)distance
                       maskAlpha:(float)alpha
                       direction:(LGSliderDrawerTransitionDirection)direction
                     gestureType:(LGSliderDrawerGestureType)gestureType;

/**
 创建一个配置对象的类方法

 @param distance 偏移距离
 @param alpha 遮罩的透明度
 @param direction 滑出方向
 @param gestureType 手势类型
 @return 配置对象本身
 */
+ (instancetype)configurationWithDistance:(float)distance
                                maskAlpha:(float)alpha
                                direction:(LGSliderDrawerTransitionDirection)direction
                              gestureType:(LGSliderDrawerGestureType)gestureType;

@end

NS_ASSUME_NONNULL_END
